package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author stone
 * @date 2022/07/13 10:10
 */
@RestController
public class HelloController {

    @RequestMapping("hello")
    public BaseRespVo hello() {
        String data = "HandlerMethod1 hello";
        System.out.println("data = " + data);
        return BaseRespVo.ok(data);
    }
    @RequestMapping("hello/name")
    public BaseRespVo helloname() {
        String data = "HandlerMethod2 hello/name";
        System.out.println("data = " + data);
        return BaseRespVo.ok(data);
    }
    @RequestMapping("goodbye/name")
    public BaseRespVo goodbyename() {
        String data = "HandlerMethod3 goodbye/name";
        System.out.println("data = " + data);
        return BaseRespVo.ok(data);
    }
    @RequestMapping("goodbye")
    public BaseRespVo goodbye() {
        String data = "HandlerMethod4 goodbye";
        System.out.println("data = " + data);
        return BaseRespVo.ok(data);
    }
}
